import { PassportStrategy } from "@nestjs/passport";
import { Profile } from "passport";
import { Strategy } from "passport-github2";

export class GithubStrategy extends PassportStrategy(Strategy, 'github') {
    constructor() {
        super({
            clientID: 'Ov23litrRg5Nmw4aUnEv',
            clientSecret: '202e94ea4c685b797b66198524126e2882725af1',
            callbackURL: 'http://localhost:3000/login-user/callback',
            scope: ['public_profile']
        })
    }
    async validate(accessToken: string, refreshToken: string, profile: Profile) {
        return profile
    }
}